#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "map.h"
#include "cube.h"

namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    MainWindow(QString newFilepath, QString gameFile);
    ~MainWindow();

    //QString getFilepath() { return filepath; }
    //void setFilepath(QString newPath) { filepath = newPath; }

    void paintEvent(QPaintEvent *event);

    void keyPressEvent(QKeyEvent *event);
    void keyReleaseEvent(QKeyEvent *event);

    QString shipFile();

private:
    Ui::MainWindow *ui;
    Map *gameMap;
    QString filepath;
    QImage bg;
    QTimer *gameTimer;
    int counter;

signals:
     void shipCrashed();
     void timerStart();

};

#endif // MAINWINDOW_H
